package com.powernode.work.controller;

import com.powernode.commons.utils.ResponseData;
import com.powernode.work.bean.ClueRemarkBean;
import com.powernode.work.service.ClueRemarkService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("clueRemark")
@Api(tags = "线索备注")
public class ClueRemarkController {
    @Autowired
    private ClueRemarkService service;

    @GetMapping("getClueRemarkByClueId")
    @ApiOperation("根据线索id获取他的备注")
    public ResponseData getClueRemarkByClueId(String clueId){
        return service.getClueRemarkByClueId(clueId);
    }

    @PostMapping
    @ApiOperation("添加备注")
    public ResponseData add(@RequestBody ClueRemarkBean remark){
        return service.add(remark);
    }
    @PutMapping
    @ApiOperation("修改备注")
    public ResponseData edit(@RequestBody ClueRemarkBean remark){
        return service.modify(remark);
    }
}
